@import "commonvars";

@mixin snippet() {
  .modal { 
    .modal-fade-screen {
      .modal-share {
        max-width: 80%;
        .modal-inner {
          overflow: hidden;
          p {
              margin: 10px 0 10px 0;
          }
        }
        .snippet-link {
          border: 1px solid #5d7c83;
          margin-left: 10px;
          padding: 10px;

          .link-to-copy {
            border: 0px;
            width: calc(100% - 46px);
            font: inherit;
            font-size: 18px;
            display: inline-block;
            vertical-align: middle;
          }

          .snippet-clip {
            display: inline-block;
            width: 46px;
            padding-left: 10px;
            height: 100%;
            cursor: pointer;
            font-size: 22px;
            vertical-align: middle;
            i.fa {
              width: 22px;
              text-align: center;
              font-size: 22px;
            }
          }
        }
      }
    }
  }
  
  .snippets-container {
    height: 100%;
    overflow-y: auto;
    
    .code-snippets-container {
      padding: 45px 45px;

      .avatar {
        height: $header-height;
        width: $header-height;
        border-radius: 50%;
        margin-bottom: 15px;
      }

      .org-avatar {
        height: 24px;
        width: 24px;
        border-radius: 50%;
        margin-bottom: 4px;
        margin-right: 8px;
        vertical-align: middle;
      }

      .org-item {
        margin-bottom: 40px;
      }

      .switch-btn {
        margin-left: 8px;
        padding: 4px 12px;
        border-radius: 4px;
        border: none;
        cursor: pointer;
        font-size: 14px;
      }

      h2 {
        font-size: 24px;
        font-weight: bold;
        margin-bottom: 5px;
      }

      .username {
        font-size: 17px;
        margin-bottom: 30px;
        margin-top: 10px;
        font-weight: 300;
        
        i {
          margin-right: 3px;
        }
      }

      .snippets {
        margin-top: 30px;

        .group {
          position: relative;
          
          &:before {
            border-left-width: 3px;
            border-left-style: solid;
            content: " ";
            position: absolute;
            top: 10px;
            left: 0;
            height: 100%;
          }

          .snippet {

            .header {
              position: relative;
              padding-left: 20px;
              font-family: $code-font-family;
              font-weight: bold;
              font-size: 14px;

              &:before {
                border-top-width: 3px;
                border-top-style: solid;
                content: " ";
                position: absolute;
                top: 78px;
                left: 0;
                width: 20px;
              }
              
              .clear-mobile {
                display: none;
              }

              .update {
                font-weight: bold;
                font-style: italic;
              }

              .actions {
                float: right;

                .btn {
                  cursor: pointer;
                  display: inline-block;
                  font-size: 18px;
                  margin-left: 18px;
                  text-decoration: none;
                }
              }
            }

            a {
              text-decoration: none;

              .code {
                margin: 40px 0 40px 26px;
                padding: 15px 15px;
                font-family: monospace;
                font-size: 14px;
                text-decoration: none;
                white-space: pre-line;
              }
            }

            &:last-child {
              position: relative;

              &:before {
                border-left-width: 3px;
                border-left-style: solid;
                content: " ";
                position: absolute;
                top: 78px;
                left: 0;
                height: 100%;
              }
            }
          }
        }
      }
    }
  }

  @include tablet {
    .snippets .header {
      span {
        display: none;
      }

      .clear-mobile {
        display: block !important;
        clear: both;
      }

      .update {
        display: block;
        float: left;
        line-height: 32px;
      }
      .actions {
        display: block;
        float: right;
        line-height: 32px;
      }
    }
  }

  @include phone {
    .snippets .header {
      span {
        display: none;
      }

      .clear-mobile {
        display: block !important;
        clear: both;
      }

      .update {
        display: block;
        float: left;
        line-height: 32px;
      }
      .actions {
        display: block;
        float: right;
        line-height: 32px;
      }
    }
  }
}

